package org.shijiagen.doc;

import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import org.shijiagen.pojo.Product;
import org.springframework.beans.BeanUtils;
@Data
@NoArgsConstructor
public class ProductDoc extends Product {

    public ProductDoc(Product product) {
        BeanUtils.copyProperties(product,this,"all");
        this.all = product.getProductName()+product.getProductTitle()+product.getProductIntro();
    }

    /**
     * 商品相关信息(名称、标题、描述)的集合
     */
    private String all;
}
